class Pwm:

    def __init__(self, framework):
        self.framework = framework
        self.command = {}

    def pwm_control(self, channel, rate, width):
        self.command = {"type": "pwm-control", "channel": channel, "rate": rate, "width": width}
        if self.framework.status:
            self.framework.write(self.command)
